﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI;
using System.Web.UI.WebControls;
using Core.Module.Interfaces.Model;

namespace Core.Module.StaticContent.umbraco.ism.modules
{
    public partial class EditSiteModulesPage : Page
    {
        protected EditSiteModules usrmodules;
        public ISite _CurSite; 
        public ISite CurSite { get {
            string siteid = (Request["site"] ?? "").Trim();
            if (_CurSite != null && _CurSite.Node.Id.Equals(siteid)) return _CurSite;
            
            if (string.IsNullOrEmpty(siteid)) return null;
            _CurSite = Core.Module.Context.Frontend.Sites.Get(siteid);
            if (Site == null) return null;
            _CurSite.Modules = Core.Module.Context.Frontend.Modules.Get(_CurSite);
            return _CurSite;  
        } }
        protected Repeater repSiteModules;

        protected override void OnInit(EventArgs e)
        {
            usrmodules.ForSite = CurSite;
            
        }
    }
}
